<?php

namespace app\http\middleware;

use think\facade\Url;

class LoginCheck
{
    public function handle($request, \Closure $next)
    {
        //echo url('login');exit();
        if(!session('user_id')){
            return redirect(url('login'));
        }
        return $next($request);
    }
}
